package com.zuoye.day06;

public class Demo {
    int a=1;
    static int b=1;

    public Demo(){
        a++;
        b++;
    }
    public Demo(int c){
        this.a=this.a-c;
        this.b=this.b-c;
    }

    public static void main(String[] args) {
        Demo t1=new Demo();
        Demo t2=new Demo(2);
        System.out.println(t1.a);  //2
        System.out.println(t1.b);  //0
        System.out.println(t2.a);  //2
        System.out.println(t2.b);  //0  要全部运行完 共享数据区数据共享 所以 t1.b  t2.b都是0

    }
}
